<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Expires content=0>
<link href="../../style/css/private.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="../../style/scripts/private.js"  language="JavaScript"></script>
<script language="javascript1.2">
	function operation(type,xlh){
	    alert();
		if(type+""=="delete"){
		
			if(!checkSelect('arrayID')){ alert("请选择记录！");return;};
			if(!confirm('将会删除此机构下所有用户，确定要删除吗？')){
				return;
			}
			window.document.forms[0].operationType.value = "delete";
		}
		else if (type+"" == "add") {
			window.document.forms[0].ORGID.value= xlh;
			window.document.forms[0].operationType.value= "add";
		}
		else if (type+"" == "edit") {
			window.document.forms[0].ORGID.value= xlh;
			window.document.forms[0].operationType.value= "edit";
		}

	  	window.document.forms[0].submit();
	}
	
	function sub(){
		if(window.document.forms[0].type.value == "sub"){
			window.document.forms[0].type.value = "ok";
			window.parent.document.all.Frame1.src="<%=request.getContextPath()%>/pages/F09/F0901Left.jsp";
			//parent.document.frames['Frame1'].document.forms[0].submit();
		}
		getMessage();
	}
	
	function getMessage(){
	    var errorMsg=document.forms[0].errorFlag.value;
	    if(""!=errorMsg){
		  alert(document.forms[0].errorFlag.value);     
		  document.forms[0].errorFlag.value="" 
	    }
}
</script>
</head>

<body marginheight="0" marginwidth="0" bottommargin="0" topmargin="0" onLoad="javascript:sub();">
<html:form method="post" action="/pages/F09/F0901RightOrg.do" enctype="multipart/form-data">
<html:hidden property="operationType"/>
<html:text property="ORGID"/>
<html:hidden property="type"/>
<html:hidden property="errorFlag"/>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
			<tr>
				<td width="5%" nowrap><table width="60" border="0" cellspacing="0" cellpadding="0" class="toolbar">
					<tr>
						<td align="center" nowrap="nowrap"><a href="javascript:operation('add','');">新增</a></td>
					</tr>
				</table></td>
				<td width="5%" nowrap><table width="60" border="0" cellspacing="0" cellpadding="0" class="toolbar">
					<tr>
						<td align="center" nowrap="nowrap"><a href="javascript:operation('delete','');">删除</a></td>
					</tr>
				</table></td>
				<td width="90%">&nbsp;</td>				
			</tr>
		</table></td>
	</tr>	
	<tr>
		<td valign="top" class="fieldset2"><div class="divHeight"><table width="100%" border="0" cellspacing="0" cellpadding="2" class="list_table">
			<tr>
			  	<td width="7%"  class="list_trb2" align="center"><input type="checkbox" name="selectAll" OnClick="clickCheckbox(this, 'arrayID');"></td>
				<td width="21%" class="list_trb2" align="center">代码</td>
				<td width="27%" class="list_trb2" align="center">机构名称</td>
				<td width="38%" class="list_trb2" align="center">备注</td>		
				<td width="7%"  class="list_trb2" align="center">编辑</td>					
			</tr>
		<logic:present name="F0901OrgActionForm" property="list">
		<logic:iterate id="rowp" name="F0901OrgActionForm" property="list">
			<tr onMouseOver="mOvr(this,'#D7E6F9');" onMouseOut="mOut(this,'');">
				<td class="list_rb" align="center"><html:multibox property="arrayID"><bean:write name="rowp" property="ORGID"/></html:multibox></td>
				<td class="list_rb" align="left"><bean:write name="rowp" property="CODE"/>&nbsp;</td>
				<td class="list_rb" align="left"><bean:write name="rowp" property="NAME"/>&nbsp;</td>
				<td class="list_rb" align="left"><bean:write name="rowp" property="NOTES"/>&nbsp;</td>
				<td class="list_rb" align="center"><a href="javascript:operation('edit','<bean:write name='rowp' property='ORGID'/>');">编辑</a></td>
			</tr>
		</logic:iterate>
		</logic:present>
		</table></div></td>
	</tr> 
	<tr>
		<td class="fieldset2"><bean:define id="actionFormName" value="F0901OrgActionForm"/><%@ include file="../../style/scripts/pageable.jsp"%></td>
	</tr> 
</table>
</html:form>
</body>
</html:html>